#define _CRT_SECURE_NO_WARNINGS 1 
#include <iostream>
using namespace std;
int& func()
{
	int ret = 0;
	//...

	return ret;
}

int& fxx()
{
	int xxx = 1000;
	//...

	return xxx;
}

int main()
{
	int& x = func();
	cout << x << endl;
	fxx();
	cout << x << endl;
	return 0;
}